package com.a.learning_keep.activity.login

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.a.learning_keep.base.BaseActivity
import com.a.learning_keep.base.post
import com.a.learning_keep.bean.LoginData
import com.a.learning_keep.databinding.ActivityForgetPasswordBinding
import kotlin.concurrent.thread

/**
 * 忘记密码页面
 * */
class ForgetPassword : BaseActivity<ActivityForgetPasswordBinding>() {
    override fun getBind(): ActivityForgetPasswordBinding {
        return ActivityForgetPasswordBinding.inflate(layoutInflater)
    }

    override fun initView() {
        binding.outReturnForget.setOnClickListener { finish() }
        binding.loginBut.setOnClickListener {
            val s1 = binding.forgetPhoneUsername.text.toString()
            val s2 = binding.verificationCode.text.toString()
            var js = ""
            thread {
//                val data = post("/user/register", js, LoginData::class.java)
                runOnUiThread {
//                    if (data.msg == "success") {

//                    }
//                    Toast.makeText(context, data.msg, Toast.LENGTH_SHORT).show()
                }

            }
        }
        binding.getVerificationCode.setOnClickListener {
            thread {

                runOnUiThread {

                }
            }
        }

    }

}